<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title></title>
<link href="css/mui.min.css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="css/loading.min.css" />
<link href="fonts/iconfont.css" rel="stylesheet" />
<link href="css/style.css" rel="stylesheet" />
</head>
<body>
<div id="app">
	<header class="mui-bar mui-bar-nav in-bar">    
		<a href="javascript:window.hostory.go(-1)" class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		<a href="index.htm" class="mui-icon mui-icon-home mui-pull-left"></a>
		<h1 class="mui-title">个人</h1>
	</header> 

	<nav class="mui-bar mui-bar-tab">
	    <a href="index.htm" class="mui-tab-item">
	        <span class="mui-icon mui-icon-home"></span>
	        <span class="mui-tab-label">首页</span>
	    </a>
	    <a href="list.htm?t=NL&type=BN" class="mui-tab-item my-tab">
	        <span class="icon icon-yumi"></span>
	        <span class="mui-tab-label">能量类</span>
	    </a>
	    <a href="list.htm?t=DB&type=BD" class="mui-tab-item my-tab">
	        <span class="icon icon-danbaizhi"></span>
	        <span class="mui-tab-label">蛋白类</span>
	    </a>
	    <a href="list.htm?t=TJJ&type=BT" class="mui-tab-item my-tab">
	        <span class="icon icon-huaxueshiji"></span>
	        <span class="mui-tab-label">添加剂</span>
	    </a>
	    <a href="list.htm?t=YZ&type=BY" class="mui-tab-item my-tab">
	        <span class="icon icon-cunqianguan"></span>
	        <span class="mui-tab-label">养殖</span>
	    </a>
	    <a href="setting.htm" class="mui-tab-item my-tab mui-active">
	        <span class="icon icon-huiyuan"></span>
	        <span class="mui-tab-label">个人</span>
	    </a>
	</nav>

	<div class="mui-content">
		<div class="userFace">
			<div class="face">
				<i class="icon icon-huiyuan"></i>
			</div>
			<template v-if="isLogin">
				<div class="userInfo">
					<p>账户：{{userinfo.name}}</p>
					<p>目前等级：{{userinfo.level}}</p>
				</div>
			</template>
			<template v-else>
				<button class="mui-btn mui-btn-warning" style="margin-top: 20px; padding: 10px 30px; background: #FFAA07;" onclick="window.location.href='login.htm'">登录</button>
			</template>
			
		</div>		
		
		<div class="mui-row three">
	        <div class="mui-col-xs-4"><a href=fav.htm">收藏</a></div>
	        <div class="mui-col-xs-4"><a href="dingyue.htm">关注</a></div>
	        <div class="mui-col-xs-4"><a href="submit.htm">爆料</a></div>
	    </div>
    
		<ul class="mui-table-view u-menu">
	        <li class="mui-table-view-cell">
	            <a href="history.htm" class="mui-navigate-right">我的足迹</a>
	        </li>
	        <li class="mui-table-view-cell">
	            <a href="info.htm" class="mui-navigate-right">个人资料</a>
	        </li>
	        <li class="mui-table-view-cell">
	            <a href="feedback.htm" class="mui-navigate-right">我要反馈</a>
	        </li>
	        <li class="mui-table-view-cell">
	            <a href="about.htm" class="mui-navigate-right">关于我们</a>
	        </li>
	        <li class="mui-table-view-cell">
	            <a href="share.htm" class="mui-navigate-right">推荐我们</a>
	        </li>
	        <li class="mui-table-view-cell">
	            <a href="legal.htm" class="mui-navigate-right">法律声明</a>
	        </li>
	        <template v-if="isLogin">
				<li class="mui-table-view-cell">
	            <a href="javascript:void(0)" v-on:tap="loginout()" class="mui-navigate-right">退出登录</a>
	        	</li>
			</template>
	    </ul>
	</div>
</div>
<script src="js/mui.min.js"></script>
<script src="js/vue.min.js"></script>
<script src="js/loading.js"></script>
<script src="js/app.js"></script>
<script type="text/javascript" charset="utf-8">	
app.init();
mui('body').on('tap','a',function(){document.location.href=this.href;});
var vm = new Vue({
	el:"#app",
	data:{
		isLogin : app.checkLogin(),
		userinfo : {}
	},
	methods:{
		goUrl : function(url){
			window.location.href=url;
		},
		loginout : function(){			
			app.setState({});
			window.location.href="setting.htm";			
		}
	},
	created : function(){		
		that = this;
		that.userinfo = app.getState();
		switch(that.userinfo.status){
			case '1':
			level = '非会员';
			break;
			case '2':
			level = '网络会员';
			break;
			case '3':
			level = '咨询会员';
			break;
			case '4':
			level = '顾问会员';
			break;
			case '5':
			level = '金银牌会员';
			break;
			default:
			level = '';
		}
		that.userinfo.level = level;
	},
	updated : function(){
		
	}
});
</script>
</body>
</html>